package com.ftg.learn.chapter15.acccess;

//import lombok.Builder;

/**
 * @author KangJx
 * @date 2021/7/23
 */
public class Human {

    private String name = "小李子";

    //char sex = '男';

    protected int age = 17;

    public String address= "哈尔滨";


    private void privateMethod(){
        System.out.println("私有方法");
    }

    void defaultMethod(){
        System.out.println("默认");
    }

    protected void protectedMethod(){
        System.out.println("保护 ");
    }

    public void publicMethod(){
        System.out.println("公共 ");
    }


    public void test(){
        name = "ttt";
        //this.sex = '女';
        this.address="中国";
        this.age=13;

        this.privateMethod();
        this.defaultMethod();
        this.protectedMethod();
        this.publicMethod();

    }


}
